// 日志中间件

const fs = require('fs');
const path = require('path');

module.exports = (req, res, next) => {
  let { url, ip } = req;
  fs.appendFileSync(path.resolve(__dirname, './assets.log'), `${url}  ${ip}\r\n`)
  next()
}